#!/bin/bash
tar xf psmisc-23.2.tar.xz
cd psmisc-23.2
ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes CFLAGS="$CFLAGS --sysroot=$1 -I$1/usr/include/ncursesw" ./configure --prefix=$1/usr --host=$4
sed -ie "s/O2/O$3/g" Makefile
make -j$2
make install
cd ..
rm -rf psmisc-23.2

